package com.security;

import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * 用来封装otp的信息
 */
public class OtpAuthentication extends UsernamePasswordAuthenticationToken {
    Boolean rememberMe;

    public OtpAuthentication(Object principal, Object credentials, Boolean rememberMe) {
        super(principal, credentials);
        this.rememberMe = rememberMe;
    }

    public OtpAuthentication(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) {
        super(principal, credentials, authorities);
    }

    public Boolean getRememberMe() {
        return rememberMe;
    }
}
